﻿using ORM.Base;
using ORM.Model;
using ORM.Parser.Design.Format;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ORM.Parser.Design
{
    public class BaseStatement : ISqlParse
    {
        public string ConnectStringName { set; get; }
        public string TableName { set; get; }
        public string PKName { set; get; }
        public string SQLText { set; get; }
        public List<string> RollBackSQLTextList { set; get; }
        public virtual void Parse(string SQLText)
        {
            RollBackSQLTextList = new List<string>();
            this.SQLText = FormatStyle.Basic.Formatter.Format(SQLText).ToLower();
        }

        public virtual List<string> GetRollBackSQL()
        {
            return this.RollBackSQLTextList;
        }
    }
}
